home *** CD-ROM | disk | FTP | other *** search
/ Network Supervisor's Toolkit / Network Supervisor's Toolkit.iso / tools / lu62 / dcproc.c < prev    next >
C/C++ Source or Header  |  1996-07-10  |  3KB  |  107 lines

  1. /********************************************************/
  2. /*                                                      */
  3. /*             the  DEALLOCATION_CLEANUP_PROC           */
  4. /*                                                      */
  5. /*                                                      */
  6. /* CopyRight 1995. Nicholas Poljakov all rights reserved*/
  7. /*                                                      */
  8. /********************************************************/
  9. #include <stdio.h>
  10. #include <rcb.h>
  11. #include <tcb.h>
  12. #include <state1.h>
  13. #include <drcb.h>
  14. #include <termps.h>
  15. #include <string.h>
  16. int sk_r_wt(void *);
  17. int SendBlock(void *, void *);
  18. int setrc(void *, void *);
  19. int sendhsf(void *);
  20. int sendhs(void *);
  21. int sendbm(void *, void *);
  22. int sendat(void *);
  23. int rtsend(void *);
  24. unsigned long rmfmh5(void *, void *);
  25. int recwait(void *);
  26. int rcvru(void *, void *);
  27. int rcvhs(void *, void *, void *, void *);
  28. int ralloc(void *, void *);
  29. int psrm(int, void *, void *);
  30. int ps_conv(int, void *);
  31. int proterr(void *, unsigned long);
  32. int preptrcv(void *, void *);
  33. int post_rcb(void *);
  34. struct repass *postopen(void *);
  35. int phsrec(void *);
  36. int pfmh5(void *);
  37. int opndst(void *);
  38. int obtsess(void *, unsigned char);
  39. int Lrf_handler(void *);
  40. int get_sess(void *, void *);
  41. int get_attr(void *);
  42. int fsm_error(unsigned char, void *);
  43. int fsm_conv(unsigned char, unsigned char, void *);
  44. int flush (void *);
  45. int dealloc(void *);
  46. int crtp(void *);
  47. int conv(void *);
  48. int chkparm(void *, void *);
  49. int check_end(unsigned int, void *);
  50. struct rqb *call_appl(void *);
  51. int buffmng(unsigned char, void *, void *, void *, unsigned, unsigned char, unsigned);
  52. unsigned long attltck(void *);
  53. unsigned long attacheck(void *);
  54. char *cgetmem(int, int);
  55. int sendhsf(void *);
  56. int opndst(void *);
  57. int alloc_rcb(void *, void *);
  58. int allocate(void *);
  59. int clsdst(void *);
  60. int bldfmh7(struct rcb *, unsigned long);
  61.  
  62. int dcp(p_tcb)
  63. struct tcb *p_tcb;
  64. {
  65. struct rcb *p_rcb;
  66. struct termps p_t;
  67. int code_rec;
  68. unsigned long sense;
  69.  
  70. #if OS_TYPE == 1
  71. /*********  Trace facility **********/
  72. unsigned int rtype;   /* type of record */
  73. unsigned int pnum;    /* point number */
  74. char pname[8];        /* name of module */
  75. char *drec;       /* record for dump */
  76. int  lenr;            /* record length */
  77.  
  78. rtype = INPROC;
  79. strcpy(pname, "dcproc");
  80. pnum = 1;
  81. drec = p_tcb;
  82. lenr = sizeof(struct tcb);
  83. gtf(rtype, pname, pnum, drec, lenr);
  84. /***********************************/
  85. #endif
  86.  
  87.   p_rcb = p_tcb -> rcb_list_ptr;
  88.  
  89.   while (p_rcb != NULL) {
  90.        if((p_rcb->conv_state != RESET)&(p_rcb->conv_state != END_CONV))
  91. /*
  92.  * Issue DEALLOCATE type ABEND_PROG for still-allocated
  93.  * resources.
  94.  */
  95.           {
  96.               sense = 0x08640000;    /* abend prog */
  97.               bldfmh7(p_rcb, sense); /* Build and send FMH-7 */
  98.           }
  99.        p_rcb = p_rcb -> next;
  100.   }
  101. /*  »«ßδ½áѼ ¬ RM ºá»¿ß∞ terminate_ps */
  102.  
  103.    p_t.p_tcb = p_tcb;
  104.    code_rec = TERMINATE_PS;
  105.    psrm(code_rec, &p_t, 0);
  106. }
  107.